package day38.edu;

import java.util.List;

// Created: 08/10/2025, ChangJiang Ru
public class DAOTest {
    public static void main(String[] args)
    {
        DAO<User> dao = new DAO<>();

        dao.save("1000", new User(1, 23, "Tom"));
        dao.save("1001", new User(2, 34, "Jerry"));

        dao.update("1001", new User(2, 34, "Milk"));

        dao.delete("1000");
        dao.delete("1001");

        List<User> list = dao.list();

        for(User u : list)
        {
            System.out.println(u);
        }
    }
}
